<template>
  <h3>Main</h3>
  <p>{{msg}}</p>
<Model @ModelEvent="get" :OnEvent="dataFn"/>
</template>

<script>
import Model from "@/components/EventWithModel/Model.vue";
export default {
  name: "MainofModel",
  data(){
    return{
      msg:"初始数据"
    }
  },
  methods:{
    get(data){
      this.msg=data
    },
    dataFn(data){
      console.log("传递数据给儿子")
      this.msg=data
    }
  },
  components: {Model}
}
</script>

<style scoped>

</style>
